/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.ufrgs.inf.prav.interop.jsf;

import br.ufrgs.inf.prav.interop.jsf.components.*;
import javax.faces.component.UIComponent;
import javax.faces.webapp.UIComponentELTag;

/**
 *
 * @author Fernando
 */
public class ImgTag extends PravBaseTag {

    //atts
    private String src, alt;
    //optionl atts
    private String height, ismap, longdesc, usemap, width;

    public ImgTag(){
        
    }


    @Override
    protected void setProperties(UIComponent component) {
	/* you have to call the super class */
	super.setProperties(component);
    ImgComponent img = (ImgComponent)component;
    img.setAlt(alt);
    img.setHeight(height);
    img.setIsmap(ismap);
    img.setLongdesc(longdesc);
    img.setSrc(src);
    img.setUsemap(usemap);
    img.setWidth(width);
}

    @Override
    public String getComponentType() {
        return ImgComponent.COMPONENT_TYPE;
    }

    @Override
    public String getRendererType() {
        return null;
    }

    // <editor-fold defaultstate="collapsed" desc="Getters and Setters">

    public String getAlt() {
        return alt;
    }

    public void setAlt(String alt) {
        this.alt = alt;
    }

    public String getHeight() {
        return height;
    }

    public void setHeight(String height) {
        this.height = height;
    }

    public String getIsmap() {
        return ismap;
    }

    public void setIsmap(String ismap) {
        this.ismap = ismap;
    }

    public String getLongdesc() {
        return longdesc;
    }

    public void setLongdesc(String longdesc) {
        this.longdesc = longdesc;
    }

    public String getSrc() {
        return src;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public String getUsemap() {
        return usemap;
    }

    public void setUsemap(String usemap) {
        this.usemap = usemap;
    }

    public String getWidth() {
        return width;
    }

    public void setWidth(String width) {
        this.width = width;
    }
    // </editor-fold>

}
